package com.cd.music.dto;

import java.util.Date;
import java.util.List;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 用途
 * @date 2018年03月06日  下午9:34
 * @address: 四川成都
 */
public class ContentDto extends BaseDto {
    /**
     * id
     */
    private String id;
    /**
     * 标题
     */
    private String title;
    /**
     * 摘要
     */
    private String summary;
    /**
     * 封面图
     */
    private String coverImage;
    /**
     * 内容
     */
    private String content;
    /**
     * 是否删除
     */
    private boolean isDelete;
    /**
     * 时间
     */
    private Date createTime;
    /**
     * 广告图片
     */
    private List advertisingList;

    /**
     * 广告图片
     */
    private String advertisingImage;

    public ContentDto() {
    }

    private ContentDto(Builder builder) {
        setToken(builder.token);
        setPageIndex(builder.pageIndex);
        setPageSize(builder.pageSize);
        setTotal(builder.total);
        setId(builder.id);
        setTitle(builder.title);
        setSummary(builder.summary);
        setCoverImage(builder.coverImage);
        setContent(builder.content);
        setIsDelete(builder.isDelete);
        setCreateTime(builder.createTime);
        setAdvertisingList(builder.advertisingList);
        setAdvertisingImage(builder.advertisingImage);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getCoverImage() {
        return coverImage;
    }

    public void setCoverImage(String coverImage) {
        this.coverImage = coverImage;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(boolean delete) {
        isDelete = delete;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List getAdvertisingList() {
        return advertisingList;
    }

    public void setAdvertisingList(List advertisingList) {
        this.advertisingList = advertisingList;
    }

    public String getAdvertisingImage() {
        return advertisingImage;
    }

    public void setAdvertisingImage(String advertisingImage) {
        this.advertisingImage = advertisingImage;
    }

    public static final class Builder {
        private String token;
        private Integer pageIndex;
        private Integer pageSize;
        private Integer total;
        private String id;
        private String title;
        private String summary;
        private String coverImage;
        private String content;
        private boolean isDelete;
        private Date createTime;
        private List advertisingList;
        private String advertisingImage;

        private Builder() {
        }

        public Builder token(String token) {
            this.token = token;
            return this;
        }

        public Builder pageIndex(Integer pageIndex) {
            this.pageIndex = pageIndex;
            return this;
        }

        public Builder pageSize(Integer pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder total(Integer total) {
            this.total = total;
            return this;
        }

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder title(String title) {
            this.title = title;
            return this;
        }

        public Builder summary(String summary) {
            this.summary = summary;
            return this;
        }

        public Builder coverImage(String coverImage) {
            this.coverImage = coverImage;
            return this;
        }

        public Builder content(String content) {
            this.content = content;
            return this;
        }

        public Builder isDelete(boolean isDelete) {
            this.isDelete = isDelete;
            return this;
        }

        public Builder createTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder advertisingList(List advertisingList) {
            this.advertisingList = advertisingList;
            return this;
        }

        public Builder advertisingImage(String advertisingImage) {
            this.advertisingImage = advertisingImage;
            return this;
        }

        public Builder advertisingImage() {
            this.advertisingImage = advertisingImage;
            return this;
        }

        public ContentDto build() {
            return new ContentDto(this);
        }
    }
}
